﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainingWorkshop.DAL_EF.Translator
{
   public class TeacherTranslator
    {
        /// <summary>
        /// Convert EF_Teacher list  in to Model_Teacher List
        /// </summary>
        /// <param name="inputList">EF Teacher List</param>
        /// <returns>Model Teacher List</returns>
        public static List<Model.Teacher> EFToModelTeacher(List<Teacher> inputList)
        {

            List<Model.Teacher> teacherList = new List<Model.Teacher>();
            foreach (Teacher t in inputList)
            {
                Model.Teacher teacher = new Model.Teacher();
                teacher.TeacherId = t.TeacherId;
                teacher.TeacherName = t.TeacherName;
                teacher.TeacherGender = t.TeacherGender;
                teacher.DepartmentId = t.DepartmentId;
                teacherList.Add(teacher);
            }
            return teacherList;

        }
    }
}
